package com.igeekhome.config;

import com.igeekhome.interceptor.LoginHandlerInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author 立以宁
 */
@Configuration
public class SystemWebMvcConfiurer implements WebMvcConfigurer {


    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        //发送短信给用户
        registry.addInterceptor(new LoginHandlerInterceptor()).addPathPatterns("/api/**").excludePathPatterns("/api/verify/getCode");
        registry.addInterceptor(new LoginHandlerInterceptor()).addPathPatterns("/page/**").excludePathPatterns("/page/login");

    }


}
